﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Register.aspx.cs" Inherits="SharingCenter.Web.Account.Register"
    MasterPageFile="~/Shared/Site.Master" %>

<asp:Content ID="registerTitle" ContentPlaceHolderID="TitlePlaceHolder" runat="server">
    新用户注册
</asp:Content>
<asp:Content ContentPlaceHolderID="head" runat="server" ID="ContentPlaceHolderID1">
    <style type="text/css">
            #register{width:500px;}
        #recaptcha_response_field
        {
            width: 300px !important;
            border-color: #ccc !important;
        }
        .regtable td
        {
            height: 30px;
        }
        .regtable .pw
        {
            width: 150px;
        }
        .w
        {
            position: relative;
        }
        #regside
        {
            position: absolute;
            top: 5px;
            left: 5px;
        }
    </style>
</asp:Content>
<asp:Content ID="registerContent" ContentPlaceHolderID="MainContentPlaceHolder" runat="server">
    <asp:ScriptManagerProxy ID="ScriptManagerProxy1" runat="server">
        <Scripts>
            <asp:ScriptReference Path="~/Account/Register.js" />
            <asp:ScriptReference Path="~/Scripts/CheckNickName.js" />
        </Scripts>
    </asp:ScriptManagerProxy>
    <div class="ctn2 w">
        <div id="regside">
            已经是成员了？请<asp:HyperLink ID="HyperLink1" runat="server" NavigateUrl="~/Account/Login.aspx">登录</asp:HyperLink>。
        </div>
        <div id="register" class="ctn-box">
            <h1 class="w5">
                <asp:Image Width="20" ID="Image1" runat="server" ImageUrl="~/Content/images/icons/notepad.png" />
                新成员注册</h1>
            <myuc:MessageBox MessageType="Error" Text="验证码错误，请重新输入。" ID="msgWrongCode" Visible="false"
                runat="server" />
            <asp:CreateUserWizard ID="CreateUserWizard1" runat="server" CreateUserButtonType="Button"
                CreateUserButtonText="注册" CssClass="createuser" Width="100%" LoginCreatedUser="false"
                RequireEmail="true" ActiveStepIndex="0">
                <HeaderStyle BorderStyle="None" />
                <WizardSteps>
                    <asp:CreateUserWizardStep ID="CreateUserWizardStep1" runat="server">
                        <ContentTemplate>
                            <div class="regtable">
                                <table>
                                    <tr>
                                        <td>
                                            <div>
                                                E-mail地址
                                            </div>
                                            <div>
                                                <asp:TextBox CssClass="usernametext" ID="UserName" runat="server" Visible="false" />
                                                <asp:CustomValidator ValidationGroup="reg" ID="CustomValidator1" runat="server" ClientValidationFunction="CheckEmail"
                                                    ControlToValidate="Email" Display="None" ErrorMessage="E-mail已经存在。"></asp:CustomValidator>
                                                <cc:CustomValidatorCallOut ID="CustomValidatorCallOut5" TargetControlID="CustomValidator1"
                                                    runat="server">
                                                </cc:CustomValidatorCallOut>
                                                <asp:TextBox CssClass="regtextbox" ID="Email" runat="server" />
                                                <asp:RequiredFieldValidator ValidationGroup="reg" ID="RequiredFieldValidator1" runat="server"
                                                    ErrorMessage="E-mail不能为空。" ControlToValidate="Email" Display="None"></asp:RequiredFieldValidator>
                                                <cc:CustomValidatorCallOut TargetControlID="RequiredFieldValidator1" runat="server">
                                                </cc:CustomValidatorCallOut>
                                                <asp:RegularExpressionValidator ID="RegularExpressionValidator1" runat="server" ErrorMessage="E-mail格式不正确。"
                                                    ValidationGroup="reg" ControlToValidate="Email" Display="None" ValidationExpression="\w+([-+.']\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*"></asp:RegularExpressionValidator>
                                                <cc:CustomValidatorCallOut ID="CustomValidatorCallOut1" TargetControlID="RegularExpressionValidator1"
                                                    runat="server">
                                                </cc:CustomValidatorCallOut>
                                            </div>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td>
                                            <table cellpadding="0" cellspacing="0">
                                                <tr>
                                                    <td>
                                                        <div class="editor-section ctn1">
                                                            <div>
                                                                登录密码
                                                            </div>
                                                            <div>
                                                                <asp:TextBox CssClass="pw" ID="Password" runat="server" TextMode="Password" />
                                                                <asp:RequiredFieldValidator ValidationGroup="reg" ID="RequiredFieldValidator2" runat="server"
                                                                    ErrorMessage="密码不能为空。" ControlToValidate="Password" Display="None"></asp:RequiredFieldValidator>
                                                                <cc:CustomValidatorCallOut ID="CustomValidatorCallOut2" TargetControlID="RequiredFieldValidator2"
                                                                    runat="server">
                                                                </cc:CustomValidatorCallOut>
                                                                <asp:RegularExpressionValidator ControlToValidate="Password" ID="RegularExpressionValidator2"
                                                                    runat="server" ErrorMessage="密码长度至少六位。" Display="None" ValidationGroup="reg"
                                                                    ValidationExpression="^.{6,}$"></asp:RegularExpressionValidator>
                                                                <cc:CustomValidatorCallOut ID="CustomValidatorCallOut4" TargetControlID="RegularExpressionValidator2"
                                                                    runat="server">
                                                                </cc:CustomValidatorCallOut>
                                                            </div>
                                                        </div>
                                                    </td>
                                                    <td>
                                                        <div class="ctn-p-l">
                                                            <div class="editor-label">
                                                                重复密码
                                                            </div>
                                                            <div class="editor-field">
                                                                <asp:TextBox ID="ConfirmPassword" CssClass="pw" runat="server" TextMode="Password" />
                                                                <asp:RequiredFieldValidator ValidationGroup="reg" ID="RequiredFieldValidator3" runat="server"
                                                                    ErrorMessage="重复密码不能为空。" ControlToValidate="ConfirmPassword" Display="None"></asp:RequiredFieldValidator>
                                                                <cc:CustomValidatorCallOut ID="CustomValidatorCallOut3" TargetControlID="RequiredFieldValidator3"
                                                                    runat="server">
                                                                </cc:CustomValidatorCallOut>
                                                                <asp:CompareValidator ID="CompareValidator1" runat="server" ErrorMessage="两次密码必须一致。"
                                                                    Display="None" ValidationGroup="reg" ControlToCompare="Password" ControlToValidate="ConfirmPassword"></asp:CompareValidator>
                                                                <cc:CustomValidatorCallOut ID="CompareValidator1CallOut" TargetControlID="CompareValidator1"
                                                                    runat="server">
                                                                </cc:CustomValidatorCallOut>
                                                            </div>
                                                        </div>
                                                    </td>
                                                    <td class="nicknamebox">
                                                        <div class="ctn-p-l"">
                                                            <div>
                                                                昵称
                                                            </div>
                                                            <div>
                                                                <asp:TextBox CssClass="nicknametext pw" ID="NickNameText" runat="server" />
                                                                <asp:RequiredFieldValidator ValidationGroup="reg" ID="RequiredFieldValidator4" runat="server"
                                                                    ErrorMessage="必须输入昵称。" ControlToValidate="NickNameText" Display="None"></asp:RequiredFieldValidator>
                                                                <cc:CustomValidatorCallOut ID="CustomValidatorCallOut6" TargetControlID="RequiredFieldValidator4"
                                                                    runat="server">
                                                                </cc:CustomValidatorCallOut>
                                                            </div>
                                                        </div>
                                                        
                                                        <asp:HiddenField runat="server" ID="hdnNickNameAbb" />
                                                        <div class="dialogform" title="选择读音">
                                                            <div style="width: 500px">
                                                                <myuc:MessageBox ID="MessageBox1" runat="server" MessageType="Generic" Text="你的昵称包含多音字，为了提高搜索准确度，请选择正确的读音。" />
                                                                <table id="polyphonebox" class="sz-l">
                                                                    <tbody>
                                                                    </tbody>
                                                                </table>
                                                                <div class="actionarea">
                                                                    <a onclick="MakeAbb()" class="submitbutton closemodalformbutton-nostyle">确定</a>
                                                                </div>
                                                            </div>
                                                        </div>
                                                    </td>
                                                </tr>
                                            </table>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td>
                                            <h3 class="w7">
                                                输入验证码
                                                </h3>
                                            <div class="editor-field">
                                            <myuc:ValidationCode runat="server" ID="ValidationCode1" ValidationGroup="reg" />
                                                  </div>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td>
                                            <asp:LinkButton ValidationGroup="reg" CausesValidation="true" ID="btnReg" runat="server"
                                                CommandName="MoveNext" CssClass="submitbutton" Text="注册" OnCommand="btnReg_Command" />
                                        </td>
                                    </tr>
                                </table>
                                <div>
                                    <%--<div class="editor-section">
                    <div class="editor-label">
                        性 别：
                    </div>
                    <div class="editor-field adjust-editor-field">
                        <asp:RadioButtonList ID="lstGender" runat="server" RepeatLayout="Flow" RepeatDirection="Horizontal">
                            <asp:ListItem Selected="True" Text="男" Value="M" />
                            <asp:ListItem Selected="True" Text="女" Value="F" />
                            <asp:ListItem Selected="True" Text="保密" Value="" />
                        </asp:RadioButtonList>
                    </div>
                    <div class="clear">
                    </div>
                </div>--%>
                                </div>
                            </div>
                        </ContentTemplate>
                        <CustomNavigationTemplate>
                        </CustomNavigationTemplate>
                    </asp:CreateUserWizardStep>
                    <asp:CompleteWizardStep ID="CompleteWizardStep1" runat="server">
                        <ContentTemplate>
                            <div>
                                <span class="sz-l">快要完成了！</span>
                                <div class="ctn1 sz-m">
                                    校验邮件已经发送到<%=ViewState["RegEmail"] %>，请点击邮件中的激活账号链接，方能登录网站。
                                </div>
                                <div class="ctn1 textcenter">
                                    <a href="Login.aspx" class="button">登 录</a>
                                </div>
                            </div>
                        </ContentTemplate>
                        <CustomNavigationTemplate>
                        </CustomNavigationTemplate>
                    </asp:CompleteWizardStep>
                </WizardSteps>
            </asp:CreateUserWizard>
        </div>
    </div>
</asp:Content>
